Population class extension: cache module
File containing the class extension for the population object that contains cache functionality
Module containing (e.g. LRU) cache functionality for binary_c-python.
We use cachetools when possible because this allows us to set up the cache of the appropriate size for the task in the population_options dict. Please see the LRU_* options in there.
- class binarycpython.utils.population_extensions.cache.cache(**kwargs)[source]
Bases:
object
Class extension for the population object that contains cache functionality
- class NullCache(*args, **kwargs)[source]
Bases:
Cache
A cachetools cache object that does as little as possible and never matches.
- default_cache_dir()[source]
Return a default cache directory path for binary_c-python, or None if we cannot find one. This is used in population_options_defaults.py